﻿Public Class ChuNhaBUS
    Public Function Insert(ByVal chu As ChuNhaDTO) As Boolean
        Dim chuDAO As New ChuNhaDAO
        Return chuDAO.Insert(chu)
    End Function
    Public Sub Delete(ByVal chu As ChuNhaDTO)
        Dim chuDAO As New ChuNhaDAO
        chuDAO.Delete(chu)
    End Sub
    Public Sub Update(ByVal chu As ChuNhaDTO)
        Dim chuDAO As New ChuNhaDAO
        chuDAO.Update(chu)
    End Sub
    Public Function GetAll() As DataTable
        Dim chunhaDAO As New ChuNhaDAO
        Dim dt As New DataTable
        dt = chunhaDAO.GetAll()
        Return dt
    End Function

    Public Function GetItemID(ByVal tenDN As String) As ChuNhaDTO
        Dim chunhaDAO As New ChuNhaDAO
        Return chunhaDAO.GetItemID(tenDN)
    End Function
    Public Function CheckEmail(ByVal chunha As ChuNhaDTO) As Boolean
        Dim cnDAO As New ChuNhaDAO
        Return cnDAO.CheckEmail(chunha)
    End Function
    Public Sub GetSVTK(ByVal tenDN As String, ByRef cn As ChuNhaDTO, ByRef tk As TaiKhoanDTO)
        Dim cnDAO As New ChuNhaDAO
        cnDAO.GetSVTK(tenDN, cn, tk)
    End Sub
    Public Function GetItemMaChuNha(ByVal machunha As Integer) As ChuNhaDTO
        Dim chunhaDAO As New ChuNhaDAO
        Return chunhaDAO.GetItemMaChuNha(machunha)
    End Function
End Class
